﻿using UnityEngine;
using System.Collections;

public class SuccessCallJar : MonoBehaviour {
    AndroidJavaClass jc;
    AndroidJavaObject jo;
	// Use this for initialization
	void Start () {
        jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
        jo = jc.GetStatic<AndroidJavaObject>("currentActivity");
	}
	
	void OnGUI()
    {
        string number = GUI.TextArea(new Rect(100, 250, 100, 20), "18237192167");
        string text = GUI.TextArea(new Rect(100, 300, 100, 20), "hello");
        if (GUI.Button(new Rect(100,100,100,50),"vibrator"))
        {
            jo.Call("ClickShake");
        }

        if (GUI.Button(new Rect(100,500,100,50),"sendSMS"))
        {
            jo.Call("SMSSend", number,text);
        }
    }
}
